#include "StdAfx.h"
#include "DIPostprocess.h"
#include <SFML/Graphics.hpp>
#include "../DIRenderer.h"
#include "../DRendererSFML.h"

using namespace Postprocesses;

DIPostprocess::DIPostprocess(void)
: m_bActive(false)
{
}

DIPostprocess::~DIPostprocess(void)
{
}

bool DIPostprocess::isActive() const
{
    return m_bActive;
}

void DIPostprocess::activate()
{
    m_bActive = true;
}

void DIPostprocess::deactivate()
{
    m_bActive = false;
}

void DIPostprocess::render(boost::shared_ptr<DIRenderer> renderer)
{
	boost::shared_ptr<DRendererSFML> sfmlRenderer(boost::static_pointer_cast<DRendererSFML>(renderer));
    sfmlRenderer->device()->Draw(*m_effect.lock());
}